<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="layui/common/commonHead :: commonHead(~{::title},~{},~{::style})">
    <title>用户管理</title>
    <style>
        /*【优先加载】解决页面初始加载样式渲染滞后导致页面样式短暂缺失影响体验的问题*/
        .dropdown-menu .dropdown-menu-nav {
            display: none
        }
    </style>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <form class="layui-form" id="user-list-search-form">
            <div class="layui-card-header layuiadmin-card-header-auto">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="id" placeholder="请输入用户编号" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">账户</label>
                        <div class="layui-input-block">
                            <input type="text" name="userAccount" placeholder="请输入登录帐号" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">性别</label>
                        <div class="layui-input-block">
                            <select name="sex">
                                <option value="">不限</option>
                                <option value="1">男</option>
                                <option value="2">女</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">邮箱</label>
                        <div class="layui-input-block">
                            <input type="text" name="email" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">手机号</label>
                        <div class="layui-input-block">
                            <input type="text" name="phone" placeholder="请输入手机号" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-card-body">
                <div style="padding-bottom: 10px;">
                    <div class="layui-table-tool-temp">
                        <button type="button" class="layui-btn layuiadmin-btn-useradmin toolbar-button" data-type="add">
                            <i class="layui-icon layui-icon-add-1 layuiadmin-button-btn"></i>添加
                        </button>
                        <!-- 下拉按钮 -->
                        <div class="dropdown-menu dropdown-hover layui-inline">
                            <button class="layui-btn icon-btn">更多 <i class="layui-icon layui-icon-drop"></i></button>
                            <ul class="dropdown-menu-nav">
                                <li><a class="toolbar-button" data-type="batchDel"><i class="layui-icon layui-icon-delete"></i>批量删除</a></li>
                                <li><a class="toolbar-button" id="toolbar-button" ><i class="layui-icon">&#xe67d;</i>导出</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="layui-table-tool-self">
                        <button type="button" class="layui-btn  layuiadmin-btn-useradmin toolbar-button" data-type="reload">
                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索
                        </button>
                        <button type="reset" class="layui-btn  layui-btn-primary toolbar-button"  data-type="reset">
                            <i class="layui-icon layuiadmin-button-btn"></i>重置
                        </button>
                    </div>
                </div>
            </div>
        </form>

            <table lay-even id="user_list_table" lay-size="sm" lay-filter="user_list_table"></table>
            <script type="text/html" id="table-useradmin-webuser">
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</a>
                {{# if(d.roleTips != '超级管理员' ){ }}
                <a class="layui-btn layui-btn-xs" lay-event="allot">分配角色</a>
                {{# } }}
                <a class="layui-btn layui-btn-xs" data-dropdown="#dropUser{{d.LAY_INDEX}}" no-shade="true">
                    更多<i class="layui-icon layui-icon-drop" style="font-size: 12px;margin-right: 0;"></i>
                </a>
                <!-- 下拉菜单 -->
                <ul class="dropdown-menu-nav dropdown-bottom-right layui-hide" id="dropUser{{d.LAY_INDEX}}">
                    <li><a lay-event="detail"><i class="layui-icon layui-icon-survey"></i>查看</a></li>
                    <li><a  lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a></li>
            </script>
        </div>
    </div>
</div>
<script type="text/html" id="imgTpl">
    <img style="display: inline-block; width: 50%; height: 100%;" src={{ d.avatar }}>
</script>
<script type="text/html" id="enableTpl">
    <input type="checkbox" name="enable" value="{{d.enable}}" data-json="{{ encodeURIComponent(JSON.stringify(d)) }}" lay-skin="switch" lay-text="正常|锁定"  lay-filter="userEnableSwitch" {{ d.enable == '1' ? 'checked' : '' }}>
</script>

<div th:replace="layui/common/commonJs :: commonJs(~{})"></div>
<script>
    layui.use(['index', 'useradmin'], function () {});
</script>
</body>
</html>
